package se.wobbia.android.service;

import org.json.JSONException;
import org.json.JSONObject;

import se.wobbia.android.data.GlobalResources;
import se.wobbia.android.data.User;
import se.wobbia.android.net.HttpProxy;

public class LoginService {
	public boolean login(User user){
		try {
			JSONObject jsonObject = new JSONObject(new HttpProxy(GlobalResources.LOGIN_URL).getRequest());
			Boolean authResult = jsonObject.getBoolean("authResult");
			return authResult;
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return false;
	}
}
